﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Common.js" type="text/javascript"></script>
    <script type="text/javascript">

        BindEvent(window, "load", function (e) {
            /*
            var eleList = document.getElementsByName("testName");
            Get("divShow").innerHTML = "eleList.length:" + eleList.length + "<br/>";
            for (var i = 0; i < eleList.length; i++) {
            Get("divShow").innerHTML += eleList[i].value + "<br/>";
            }
            */
            /*
            var tagList = document.getElementsByTagName("INPUT");
            Get("divShow").innerHTML = "tagList.length:" + tagList.length + "<br/>";
            for (var i = 0; i < tagList.length; i++) {
                if (tagList[i].type == "text" || tagList[i].type == "password") {
                    Get("divShow").innerHTML += tagList[i].value + "<br/>";
                }
            }
            */

            var tagList = Get("divBox").getElementsByTagName("INPUT");
            Get("divShow").innerHTML = "tagList.length:" + tagList.length + "<br/>";
            for (var i = 0; i < tagList.length; i++) {
                Get("divShow").innerHTML += tagList[i].value + "<br/>";
            }

        });


    </script>
</head>
<body>
    <input name="testName" type='text' value="123" />
    <div id="divBox">
        <input name="testName" type="password" value="abc" />
        <input name="testName" type="radio" value="男" />
    </div>
    <div id="divShow">
    </div>
</body>
</html>
